package site.zhangzhuo.v2;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.HashSet;

/**
 * @ClassName Yan
 * @Author "王二麻子"
 * @Date 2024/12/6 10:42
 * 眼
 **/
public class Yan {
    //眼识获得的字法
    private StringBuilder yanshi=new StringBuilder();

    public String getYanshi(){
        return yanshi.toString();
    }

    //查看一段文字
    public void readString(String juzi){
        yanshi.append(juzi);
    }

    //读取文本文件
    public void readFile(String fileFullPath){
        Path filePath = Path.of(fileFullPath);
        try {
            String content = Files.readString(filePath);
            yanshi.append(content);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

}
